package edu.hawaii.duedates;

import java.util.TimerTask;

/**
 * Creates an object for running a task in DueDates.
 * It will the output() task in dueDates in a
 * timely matter based on the TimerTask
 * @author Tyler Wolff and Scheller Sanchez
 */
public class DueDateTimer extends TimerTask {
  DueDates dueDate;
  
  /**
   * The constructor.
   * 
   * @author Tyler Wolff and Scheller Sanchez
   * @param dueDate The DueDates object.
   */
  public DueDateTimer(DueDates dueDate) {
    this.dueDate = dueDate;
  }
  
  /**
   * Runs dueDate.output.
   * 
   * @author Tyler Wolff and Scheller Sanchez
   */
  @Override
  public void run() {
    this.dueDate.output();
  }
  
}